import kotlin.random.Random

object ArrayGenerator {
    fun generateRandomArray(n: Int, max: Int = 0) : MutableList<Int> {
        val bound: Int = if (max == 0) {
            n
        }else {
            max
        }

        val l = mutableListOf<Int>()

        for (i in 0 until n) {
            l.add(Random.nextInt(0, bound))
        }

        return l
    }

    fun generateSortedArray(n: Int) : MutableList<Int> {
        val l = mutableListOf<Int>()
        for (i in 0 until n) {
            l.add(i)
        }
        return l
    }
}